﻿<%@ Page Title="" MaintainScrollPositionOnPostback="true" Language="C#" MasterPageFile="~/UI_MasterPage/Main.master" AutoEventWireup="true" CodeFile="ViewArticle.aspx.cs" Inherits="UI_Main.PresentationViewArticle" %>
<%@ Register TagPrefix="asp" TagName="PageNavigator" Src="~/UserControl/Page.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="body" Runat="Server">
    <asp:HiddenField ID="ArticleHidden" runat="server" />
    <div class="title">
        <asp:Label ID="lblTile" runat="server" Text=""></asp:Label>
    </div>
    <div class="content">
        <asp:Label ID="lblContent" runat="server" Text=""></asp:Label>
    </div>
    <div class="author">
        <asp:Label ID="lblAuthor" runat="server" Text=""></asp:Label>
    </div>
    
   <asp:Repeater ID="CommentRepeater" runat="server">
        <ItemTemplate>
        <div class="commentItem"
                onmouseover="toolVisible('<%# Eval("Id") %>')" 
                onmouseout="toolInvisible('<%# Eval("Id") %>')">
            <table cellpadding="3" style="width: 487px">
                <tr>
                    <td rowspan="2" style="width:50px; height: 50px" valign="top">
                        <img src="../Resource/Images/tea.png" alt="avater" width="50" height="50" />
                    </td>
                    <td style="padding-top: 5px">
                        <a href="#" class="commentCreator"><%# Eval("PostedPerson") %></a>
                        <span class="commentContent"><%# Eval("Message") %></span>
                        <span id="<%# Eval("Id") %>" 
                            class="toolEdit" 
                            onmouseover="toolVisible(this.id)" 
                            onmouseout="toolInvisible(this.id)">
                            <img src="../Resource/Images/recycle.png" class="iconSize" alt="delete" onclick="callDelete(this.parentNode.parentNode, 'deleteComment', '<%# Eval("Id") %>')"/>
                        </span>
                    </td>
                </tr>
                <tr>
                    <td>               
                        <span class="commentCreatedDate">
                            <%# Eval("PostedDate") %>
                        </span>
                    </td>
                </tr>
            </table>
        </div>
        </ItemTemplate>
    </asp:Repeater>
    <asp:PageNavigator CssClass="pageNavigator" ID="PageNavigator" runat="server"/>

    <div class="commentItem">
    <table cellpadding="3" style="width: 100%">
        <tr>
            <td style="width:50px; height: 50px" valign="top">
                <img src="../Resource/Images/tea.png" alt="avatar" width="50" height="50" />
            </td>
            <td>
                <asp:TextBox ID="CommentTextBox" TextMode="MultiLine" Width="100%" CssClass="inputText" runat="server"></asp:TextBox>
                <asp:Button ID="SendButton" runat="server" onclick="SendButton_Click" Text="Gửi" />
            </td>
        </tr>
    </table>
</div>
</asp:Content>

